import Layout from '@/layout/index.vue'

const constantsRoutes = [
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },

  {
    path: '/404',
    component: () => import('@/views/404'),
    hidden: true
  },

  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [{
      path: '/dashboard',
      name: 'dashboard',
      component: () => import('@/views/dashboard/index.vue'),
      meta: { title: '工作台', icon: 'dashboard' }
    }]
  },

  {
    path: '/visualization',
    component: Layout,
    children: [{
      path: '',
      name: 'visualization',
      component: () => import('@/views/visualization/visualization.vue'),
      meta: { title: '可视化', icon: 'visualization' }
    }]
  },

  {
    path: '/map',
    component: () => import('@/views/map/map.vue'),
    hidden: true
  },

  { path: '*', redirect: '/404', hidden: true }
]

export default constantsRoutes
